/**
 * 
 */
package jvs.vfs.sec;

import java.util.List;

/**
 * @author qiangli
 * 
 */
public interface AccessControl {
	public String ADMIN_GROUP = "admin";

	public abstract boolean addGroup(String group);

	public abstract boolean addPrincipal(String principal, String name,
			String group);

	public abstract boolean checkGroup(String group);

	public abstract boolean checkGroup(String principal, String group);

	public abstract boolean checkPrincipal(String principal);

	public abstract Group findGroup(String gid) throws Exception;

	public abstract User findUser(String uid) throws Exception;

	public abstract User findUser(String gid, String uid) throws Exception;

	public abstract List<Group> getGroups(String principal);

	public abstract List<User> getPrincipals(String group);

	public abstract List<Group> groups();

	public abstract boolean removeGroup(String group);

	public abstract boolean removePrincipal(String principal, String group);

	public abstract boolean removeUser(String uid);

	public abstract boolean updateGroup(String group, String newgroup);

	public abstract boolean updateUser(String principal, String name);

	public abstract List<User> users();

}
